import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  //获取持仓
  queryHold: (query) => api.post(`${config.interfaces.type1}instructionExchange/queryZgtzptViewJYSList`, query),
  //获取标准券 总额
  getTotalAsset: (query) => api.get(`${config.interfaces.type1}instructionExchange/queryJYSZYZE`, query),
  //获取标准券 可用
  getAvailableAsset: (query) => api.get(`${config.interfaces.type1}instructionExchange/queryJYSBZQKY`, query),
  //查询交易标的
  queryTradingCode: (query) => api.get(`${config.interfaces.type1}instructionExchange/queryTradingCode`, query),

  // 提交质押类型 判断单个债券的 可用数量
  queryAvailableAmount: (query) => api.get(`${config.interfaces.type1}instructionExchange/queryAvailableAmount`, query),
  // 转回质押类型 判断单个债券的质押数量
  queryPledgeAmount: (query) => api.get(`${config.interfaces.type1}instructionExchange/queryPledgeAmount`, query),
  //指令下达
  saveOrder: (query) => api.post(`${config.interfaces.type1}bondTrade/saveInstruction`, query),
  //簿记下达
  saveOrderTradeBook: (query) => api.post(`${config.interfaces.type1}bondTrade/saveInstruction2`, query),
  // 存续管理
  tradeBookSave: (query) => api.post(`${config.interfaces.type1}bondTrade/saveInstruction3`, query),
  //查询指令下达基本信息数据
  queryBaseInfo: (query) => api.get(`${config.interfaces.type1}tradeOperate/queryDetailById`, query),
};
